<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/16
 * Time: 17:25
 */

namespace app\admin\validate;


use think\Validate;

class Goods extends Validate
{
    protected $rule = [
        'goods_name' => 'require|max:32',
        'simple_name' => 'max:16',
        'category' => 'number',
        'cost_price' => '',
        'market_price' => '',
        'sale_price' => 'in:0,1,2',
        'is_on_sale' => 'in:0,1,2',
        'is_recommend' => 'in:0,1,2',
    ];
}